<?php
namespace app\index\validate;
use think\Validate;

class User extends Validate {
    protected $rule = [
        ['username','require|max:20','用户名必须传递|用户名不得超过20个字符'],
        ['password','require'],
        ['email','email'],
    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'login'  =>  ['username','password'],
    ];

}